<!-- 达播预测 -->
<template>
  <div class="mainTable">
    <BaseTable :query="query" :tableItems="tableItems" :updateItems="updateItems" :optionList="optionList"
      :methodParam="methodParam" :Btn="Btn" menuName="logRecord" pageName="mainTable" />
  </div>
</template>
<script>
import dayjs from "dayjs"
import BaseTable from "../../table/dbycTable.vue";
import { service } from "../../../services/backServices";
export default {
  name: "dbyc",
  data() {
    return {
      //后端人员修改-S
      //查询参数
      query: [
        // { prop: "sixtyNineCode", type: "input", placeholder: "请输入69码", value: "6921443499044", name: "预测商品69码" },
        // { prop: "referenceBeginDate", type: "singleTime", placeholder: "请选择", value: "2023-08-25", name: "起始时间" },
        // { prop: "referenceEndDate", type: "singleTime", placeholder: "请选择", value: "2023-08-30", name: "结束时间" },


        // # livestreamer_douyin_id = '13.henbang'      达人抖音号	普通输入框
        { prop: "livestreamerDouyinId", type: "input", placeholder: "请输入达人抖音号", value: "13.henbang", name: "达人抖音号" },

        // # living_count = 0.1                         直播次数	整数数值
        { prop: "livingCount", type: "input", placeholder: "请输入直播次数", value: "2", name: "直播次数" },
        
        // # living_price = 1                           直播价格	数值
        { prop: "livingPrice", type: "input", placeholder: "请输入直播价格", value: "100", name: "直播价格" },
        
        // # living_incl_tax_service_cost = 0.1         服务费	数值
        { prop: "livingInclTaxServiceCost", type: "input", placeholder: "请输入服务费", value: "100", name: "服务费" },
        
        // # living_commission_rate = 0.1                佣金率	数值
        { prop: "livingCommissionRate", type: "input", placeholder: "请输入佣金率", value: "0.1", name: "佣金率" },

        // # other_cost = 0.3                           其余费用	数值
        { prop: "otherCost", type: "input", placeholder: "请输入其余费用", value: "100", name: "其余费用" },

        // # first_level_cost_support = 0.2             一级费用支持	数值
        { prop: "firstLevelCostSupport", type: "input", placeholder: "请输入一级费用支持", value: "100", name: "一级费用支持" },

        // # good_series = '樱肌感'                     商品系列	下拉框，选项来自good_product_price表中product_series字段 --yyf待修复
        { prop: "goodSeries", type: "select", placeholder: "请选择商品系列", value: "樱肌感", name: "商品系列" },

        // # living_start_time = '2023-08-01'           直播开始时间	date
        { prop: "livingStartTime", type: "singleTime", placeholder: "请输入达人抖音号", value: "2023-08-01", name: "直播开始时间" },
        
        // # sixty_nine_code = 69214434986431          69码	普通输入框
        { prop: "sixtyNineCode", type: "input", placeholder: "请输入69码", value: "69214434986431", name: "预测商品69码" },

      ],



      //表格表头
      tableItems: [
        // { name: "达人", prop: "达人", align: "left", width: '230px' },

        { name: "直播开始时间", prop: "直播开始时间", align: "left" },
        { name: "主播昵称", prop: "主播昵称", align: "left" },
        { name: "主播抖音号", prop: "主播抖音号", align: "left" },
        { name: "直播次数", prop: "直播次数" },
        { name: "商品系列", prop: "商品系列", align: "left" },
        { name: "直播价格", prop: "直播价格" },
        { name: "服务费", prop: "服务费" },
        { name: "佣金率", prop: "佣金率" },
        { name: "其余费用", prop: "其余费用" },
        { name: "一级费用支持", prop: "一级费用支持" },
        { name: "69码", prop: "69码", align: "left" },
        { name: "产品组合", prop: "good_product_combination", align: "left" },
        { name: "最高峰值预测值", prop: "最高峰值预测值" },
        { name: "转化率预测值", prop: "转化率预测值" },
        { name: "销量计算", prop: "销量计算" },
        { name: "实收销售额计算", prop: "实收销售额计算" },
        { name: "开单价格", prop: "开单价格" },
        { name: "赠品价格", prop: "赠品价格" },
        { name: "开单销售额计算", prop: "开单销售额计算" },
        { name: "折扣费率", prop: "折扣费率" },
        { name: "折扣费用", prop: "折扣费用" },
        { name: "赠品费率", prop: "赠品费率" },
        { name: "赠品金额", prop: "赠品金额" },
        { name: "佣金费额", prop: "佣金费额" },
        { name: "平台扣点费用", prop: "平台扣点费用" },
        { name: "费额合计", prop: "费额合计" },
        { name: "运营费额", prop: "运营费额" },
        { name: "总费率（base开单销售额）", prop: "总费率（base开单销售额）" },
        { name: "总费率", prop: "总费率" },
        { name: "ROI", prop: "ROI" },
        
      ],
      //增删查改的对象属性
      updateItems: [//edit是回复
        { name: "文件名称", prop: "fileName", type: "input", disabled: true },
        { name: "上传类型", prop: "uploadType", type: "select" },
        { name: "备注", prop: "remark", type: "textarea" },
        { name: "上传文件", prop: "fileAdd", type: "upload" },
      ],
      //增删查改的对象属性的下拉select或者级联cascader
      optionList: {
        unit: [
          { label: "日", value: "日" },
          { label: "周", value: "周" },
          { label: "月", value: "月" },
          { label: "年", value: "年" },
        ],
        platform: [
          { label: "天猫", value: "天猫" },
          { label: "抖音", value: "抖音" },

        ],
        goodSeries: [
          { label: "樱肌感", value: "樱肌感"}
        ]
      },
      //增删查改方法参数
      methodParam: "dyFlagshipStoreLivingRoomDayStatExe",

      //自定义btn功能
      Btn: {
        search: true, //查询按钮
        add: false, //添加按钮
        edit: false, //回复按钮
        detail: false, //详情按钮
        delete: false, //删除按钮
        deletes: false, //批量删除按钮
        export: true, //导出按钮
        templateDownload: false, //模板下载按钮
        upload: false, //上传按钮
      },
      //后端人员修改-E
    };
  },
  components: {
    BaseTable
  },
  created() {
    let _this = this
    service({
      url: "getAllProductSeriesName",
      method: 'post'
    }).then((res) => {
      if (res.data.code == 200) {
        debugger
        this.optionList.goodSeries = res.data.data.map(x => {
          return {
            value: x,
            label: x
          }
        })
      }
    })
  }
};
</script>
<style scoped lang="less">
.mainTable {
  background-color: #f1f2f9;

  ::v-deep {
    .header-query {
      // width: 350px !important;
    }

    .search-input {
      // margin-right: 0 !important;
    }
  }
}
</style>